//
//  ChooseViewController.m
//  ZhiHuiLiJiang
//
//  Created by Work on 2018/11/18.
//  Copyright © 2018年 王雅鹏. All rights reserved.
//选择身份的VC--已废弃

#import "ChooseViewController.h"
#import "ChooseTypeView.h"//选择身份的View

@interface ChooseViewController ()
/**选择身份的View*/
@property (nonatomic ,strong) ChooseTypeView *chooseView;

@end
@implementation ChooseViewController
- (void)viewDidLoad {
    [super viewDidLoad];
    [self addSubView];
}
- (void)viewWillAppear:(BOOL)animated{
    [super viewWillAppear:animated];
    if (!self.tabBarController.tabBar.isHidden) {
        self.tabBarController.tabBar.hidden = YES;
    }
}
- (void)addSubView{//选择身份的View
    _chooseView = [[ChooseTypeView alloc]initWithFrame:CGRectMake(0, BY_StatusBar_H, BY_ScreenWidth, BY_ScreenHeight-BY_StatusBar_H-BY_Bot_H)];
    _chooseView.backgroundColor = [UIColor whiteColor];
    [self.view addSubview:_chooseView];
    BY_kWeakSelf(ws);
    _chooseView.clickCompleteBtn = ^(NSString *typeStr) {
        [ws comfirmBtnClick:typeStr];
    };
}
- (void)comfirmBtnClick:(NSString *)type{//确认了身份
    [APPDELEGATE.loginInfoDic setObject:type forKey:@"status_type"];
    [[NSUserDefaults standardUserDefaults] setObject:APPDELEGATE.loginInfoDic forKey:LoginUserName];
    [[NSUserDefaults standardUserDefaults] synchronize];
    [self.navigationController popToRootViewControllerAnimated:YES];
}


@end
